package com.freshcity.manager
{
	import com.freshcity.manager.support.FixMsgRollImpl;
	import com.freshcity.manager.support.MsgPopupImpl;
	import com.freshcity.manager.support.MsgRollTipsImpl;
	import com.pblabs.core.IPBManager;

	public class MsgManager implements IPBManager
	{
		[Inject]
		public var layerManager:LayerManager;
		
		public static var BOTTOM_RIGHT:int = 0;
		public static var CENTER:int = 1;

		public static var COOL:int = 1;
		public static var CRY:int = 2;
		public static var HAHA:int = 3;
		public static var HELLO:int = 4;
		public static var FEIJI:int = 5;
		
		private static var _msgRollTipsImpl:MsgRollTipsImpl;
		private static var _msgPopupTipsImpl:MsgPopupImpl;
		private static var _msgFixMsgRollImpl:FixMsgRollImpl;

		public function initialize():void
		{
			_msgRollTipsImpl=new MsgRollTipsImpl();
			LayerManager.msgTipLayer.addChild(_msgRollTipsImpl);
			_msgPopupTipsImpl=new MsgPopupImpl();
			LayerManager.msgTipLayer.addChild(_msgPopupTipsImpl);
			_msgFixMsgRollImpl = new FixMsgRollImpl();
			LayerManager.sceneLayer.addChild(_msgFixMsgRollImpl);
		}
		
		public function destroy():void
		{
			// TODO Auto Generated method stub
			
		}
		
		public function showRollTipsMsg(arg1:String):void
		{
			if (arg1 == null || arg1 == "")
			{
				return;
			}
			_msgRollTipsImpl.showMsg(arg1);
		}
		
		public function showFixRollMsg(arg1:String):void
		{
			if (arg1 == null || arg1 == "")
			{
				return;
			}
			_msgFixMsgRollImpl.showMsg(arg1);
		}		
		
		public function showPopUpMsg(arg1:String,status:int,timeout:int=3,position:int=0,callback:Function=null):void
		{
			if (arg1 == null || arg1 == "")
			{
				return;
			}
			_msgPopupTipsImpl.showMsg(arg1,status,timeout,position,callback);
		}

	}
}
